
<?php
require_once 'model/db.php';

$query= "SELECT * FROM pages";
$pages=  getPage($query);
?>

<table border ="1">
    <tr>
        <th>pid</th>
        <th>picture</th>
        <th>ID</th>
        <th>Name</th>
        <th>Username</th>
        <th>Phone</th>
        <th>Like</th>
        
    </tr>
<?php foreach ($pages as $page): ?>
    <tr><?php if((int)$_GET.$page['likes']>= 1000): ?>
        <td><?php echo $page['pid'] ?></td>
         <td><img src ='<?php echo $page["picture"]?>'></td>
        <td><?php echo $page['id'] ?></td>
        <td><?php echo $page['name'] ?></td>
        <td><?php echo $page['username'] ?></td>
        <td><?php echo $page['phone'] ?></td>
        <td><?php echo $page['likes']?></td>
        <?php endif;?>
    </tr>

<?php endforeach; ?>
</table>
